<!--/* index 首页  */-->
<section xmlns:th="https://www.thymeleaf.org" class="above" th:fragment="index">
  <div class="above-info">
    <h1 class="above-title" th:text="${site.title}"></h1>
    <div class="above-subtitle">
      <span class="above-subtitle--text"></span>
    </div>
  </div>
</section>

<!--/* post 文章 */-->
<section xmlns:th="https://www.thymeleaf.org" class="above" th:fragment="post">
  <div class="above-info">
    <h1 class="post-title" th:text="${post.spec.title}"></h1>
    <ul class="post-meta">
      <li class="row">
        <span class="wp category" th:if="${not #lists.isEmpty(post.categories)}">
            <i class="fa-solid fa-layer-group"></i>
            <span class="cys">
              <th:block th:each="cy : ${post.categories}">
                <a class="lk" th:href="${cy.status.permalink}" th:text="${cy.spec.displayName}"></a>
              </th:block>
            </span>
        </span>

        <span class="wp tag" th:if="${not #lists.isEmpty(post.categories)}">
           <i class="fa-duotone fa-tags"></i>
            <span class="cys">
              <th:block th:each="cy : ${post.tags}">
                <a class="lk" th:href="${cy.status.permalink}" th:text="${cy.spec.displayName}"></a>
              </th:block>
            </span>
        </span>
      </li>

      <li class="row">
        <span class="wp publishTime">
            <i class="fa-solid fa-calendar-days"></i>
            <time th:text="'发布于 '+${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></time>
        </span>

        <span class="wp lastModifyTime">
            <i class="fas fa-history fa-fw"></i>
            <time th:text="'更新于 '+${#dates.format(post.status.lastModifyTime, 'yyyy-MM-dd')}"></time>
        </span>
      </li>

      <li class="row" th:with="leg = ${#strings.length(#strings.trim(post.content.content))}">
        <span class="wp wordCount">
          <i class="fa-solid fa-list-ol"></i>
          <span th:text="'字数总计 '+${leg}"></span>
        </span>

        <span class="wp clock">
           <i class="fa-regular fa-clock"></i>
          <span th:text="'阅读时长 '+${leg/800}+'分钟'"></span>
        </span>

        <span class="wp visit">
          <i class="far fa-eye fa-fw"></i>
          <span th:text="'阅读量 '+${post.stats.visit}"></span>
        </span>
      </li>
    </ul>
  </div>
</section>

<!--/* archives 归档 */-->
<section xmlns:th="https://www.thymeleaf.org" class="above" th:fragment="archives">
  <div class="above-info">
    <h1 class="above-title">归档</h1>
  </div>
</section>

<!--/* tags 标签 */-->
<section xmlns:th="https://www.thymeleaf.org" class="above" th:fragment="tags">
  <div class="above-info">
    <h1 class="above-title">标签</h1>
  </div>
</section>

<section xmlns:th="https://www.thymeleaf.org" class="above" th:fragment="tag">
  <div class="above-info">
    <h1 class="above-title">标签</h1>
  </div>
</section>

<!--/* 头部  */-->
<header
  xmlns:th="https://www.thymeleaf.org"
  th:fragment="h(page)"
  th:class="${not theme.config[page].enable_above ? 'header dp' : 'header'}"
>
  <!--/* 导航栏 */-->
  <th:block th:replace="~{modules/nav}"/>

  <!--第一屏内容-->
  <th:block th:if="${theme.config[page].enable_above}" th:insert="~{::${page}}"/>
</header>

